<%@page import="java.util.ArrayList,com.point.community.User"%>
<%@page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@taglib uri="/struts-tags" prefix="s"%>
<%@page import="java.lang.Integer"%>
<%@page import="java.lang.String"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<div class="pageHeader">
    <form id="pagerForm" rel="pagerForm" onsubmit="return navTabSearch(this);" action="getUser" method="post">
        <input type="hidden" name="pageNum" value="<s:property value="#session.currentPage" />" />
        <input type="hidden" name="numPerPage" value="<s:property value="#session.numPerPage" />" /> 
        <input type="hidden" name="method" value="page" />
        <div class="searchBar">
            <table class="searchContent">
                <tr>
                    <td>
                        手机：<input type="text" name="phone" value="<s:property value="#session.phone" />"/>
                    </td>
                    <td>
                        名字：<input type="text" name="name" value="<s:property value="#session.name" />"/>
                    </td>
                    <td>
                        <select class="combox" name="status">
                            <option value="">用户状态</option>
                            <option value="0" >未激活</option>
                            <option value="1" >已激活</option>
                            <option value="2" >拒绝</option>
                            <option value="3" >取消关注</option>
                            <option value="4" >离职</option>
                            <option value="5" >黑名单</option>
                        </select>
                    </td>
                </tr>
            </table>
            <div class="subBar">
                <ul>
                    <li><div class="buttonActive"><div class="buttonContent"><button type="submit">检索</button></div></div></li>
                </ul>
            </div>
        </div>
    </form>
</div>
<div class="pageContent">
    <div class="panelBar">
        <ul class="toolBar">
            <li><a class="edit"  target="selectedTodo" rel="ids"  href="getUser?uid=<s:property value="id" />" target="navTab" warn="请选择一个用户"><span>修改</span></a></li>
            <li class="line">line</li>
            <li><a title="确实要删除吗?" target="selectedTodo" rel="ids" href="getUser?uid=<s:property value="id" />" class="add"><span>设置为管理员</span></a></li>
            <li class="line">line</li>
        </ul>
    </div>
    <table class="table" width="100%" layoutH="138">
        <thead>
            <tr>
                <th width="22"><input type="checkbox" group="ids" class="checkboxCtrl"></th>
                <th width="70">姓名</th>
                <th width="120">手机</th>
                <th width="80">用户状态</th>
                <th width="120">用户类型</th>
                <th >备注</th>
            </tr>
        </thead>
        <tbody>
        	<s:iterator value="#session.userList" status="m">
				<tr target="sid_user">
					<td><input name="ids" value="<s:property value="id" />" type="checkbox" ></td> 
					<td><s:property value="name" /></td>
					<td><s:property value="phone"/></td>
					<s:if test="#status==0 ">
                        <td>未激活</td>
                    </s:if>
                    <s:if test="#status==1 ">
                        <td>已激活</td>
                    </s:if>
                    <s:if test="#status==2 ">
                        <td>拒绝</td>
                    </s:if>
                    <s:if test="#status==3 ">
                        <td>取消关注</td>
                    </s:if>
                    <s:if test="#status==4 ">
                        <td>离职</td>
                    </s:if>
                    <s:if test="#status==5 ">
                        <td>黑名单</td>
                    </s:if>
                    <s:if test="#status>5 ">
                        <td>其他</td>
                    </s:if>
                    <s:if test="#type==0 ">
                        <td>管理员</td>
                    </s:if>
                    <s:if test="#type==1 ">
                        <td>普通用户</td>
                    </s:if>
                    <s:if test="#type>1 ">
                        <td>其他</td>
                    </s:if>
					<td><s:property value="remark" /></td>
				</tr>
			</s:iterator>
                </tr>
            </c:forEach>
        </tbody>
    </table>
    <div class="panelBar">
        <div class="pages">
            <span>显示</span>
            <select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
                <option value="10" <s:if test="10 == #session.numPerPage">selected="selected"</s:if>>10</option>
                <option value="20" <s:if test="20 == #session.numPerPage">selected="selected"</s:if>>20</option>
                <option  value="50"  <s:if test="50 == #session.numPerPage">selected="selected"</s:if>>50</option>
            </select>
            <span>条，共<s:property value="#session.totalCount" />条</span>
        </div>
        <div class="pagination" targetType="navTab" totalCount= "<s:property value="#session.totalCount" />" numPerPage="<s:property value="#session.numPerPage" />" pageNumShown="<s:property value="#session.pageNumShown" />" currentPage="<s:property value="#session.currentPage" />"></div>
    </div>
</div>